package com.book.bookmanager.controller;

import com.book.bookmanager.pojo.Menu;
import com.book.bookmanager.service.menuService;
import com.book.common.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("menu")
@Api(tags = "菜单管理")
public class menuController {
    @Autowired
    private menuService ms;

    @ApiOperation("获得菜单列表")
    @GetMapping("/list")
    public Result<List<Menu>> getList(){

            List<Menu> menuList = ms.getAllList();

            return Result.success(menuList);


    }

}
